hip.wasm

Undocumented in source.

Members

Aliases

JSDelegateType
alias JSDelegateType(T) = AliasSeq!(ubyte*, ubyte*, ubyte*)
Undocumented in source.
JSFunction
alias JSFunction(T) = ubyte*

JSFunctions are represented opaquely right now.

JSStringType
alias JSStringType = AliasSeq!(size_t, void*)
Undocumented in source.

Functions

__callDFunction
ubyte* __callDFunction(size_t addr, ubyte* args)

Javascript function to call a D callback.

freeWasmBinary
void freeWasmBinary(ubyte[] binary)
Undocumented in source. Be warned that the author may not have intended to support it.
getWasmArray
ubyte[] getWasmArray(ubyte* ptr)

The first index of a wasm array (which is a ptr) is a size_t value containing length

getWasmBinary
ubyte[] getWasmBinary(ubyte* input)
Undocumented in source. Be warned that the author may not have intended to support it.
loadMemoryInStruct
Struct loadMemoryInStruct(ubyte* arg, ubyte* rootArg)
Undocumented in source. Be warned that the author may not have intended to support it.
sendJSDelegate
JSDelegate sendJSDelegate()
Undocumented in source. Be warned that the author may not have intended to support it.
sendJSFunction
ubyte* sendJSFunction()

Whenever wanting to pass a callback to Javascript, call this function instead. This function is not expected to meet usercode. But it will stay here nevertheless.

toFunc
ubyte* function(ubyte* args) toFunc()

Generates a delegate which adds the this context from the arguments. It also packs the arguments sent from Javascript and transform them to the data the D delegate expects. There is also a validation in the arguments received.

wasmParametersFromUbyte
Arguments!fn wasmParametersFromUbyte(ubyte* arg)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Arguments
struct Arguments(alias Func)
Undocumented in source.
JSDelegate
struct JSDelegate
Undocumented in source.
JSString
struct JSString
Undocumented in source.
WasmParametersMemory
struct WasmParametersMemory

This is a special struct, loaded with the source pointer from bridge_malloc.

Meta